//
//  GSSubscrebe_Add_Topic_Details.m
//  GameSky
//
//  Created by lanou on 16/1/12.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSSubscrebe_Add_Topic_Details.h"

@implementation GSSubscrebe_Add_Topic_Details
// kvo保护方法
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{

}

// kvo 赋值
- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"thumbnailURLs"]) {
        self.thumbnailURLs = [NSMutableArray array];
        for (NSString *str in value) {
            [_thumbnailURLs addObject:str];
        }
    }
    
    if ([key isEqualToString:@"childElements"]) {
        self.childElements = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            GSSubscrebe_Add_Topic_Details *model = [[GSSubscrebe_Add_Topic_Details alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [self.childElements addObject:model];
        }
    }
}

@end
